package me.zhengjie.dao;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 任务记录表
 * @TableName iws_sampling
 */
@TableName(value ="iws_sampling")
public class SamplingDao {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 单据
     */
    private String documents;

    /**
     * 开始位置
     */
    private String startLocation;

    /**
     * 结束位置
     */
    private String endLocation;

    /**
     * 物料编码
     */
    private String materialCode;

    /**
     * 重量
     */
    private Double weight;

    /**
     * 载具编码
     */
    private String containerCode;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 类型
     */
    private Integer type;

    /**
     * id
     */
    public Long getId() {
        return id;
    }

    /**
     * id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 单据
     */
    public String getDocuments() {
        return documents;
    }

    /**
     * 单据
     */
    public void setDocuments(String documents) {
        this.documents = documents;
    }

    /**
     * 开始位置
     */
    public String getStartLocation() {
        return startLocation;
    }

    /**
     * 开始位置
     */
    public void setStartLocation(String startLocation) {
        this.startLocation = startLocation;
    }

    /**
     * 结束位置
     */
    public String getEndLocation() {
        return endLocation;
    }

    /**
     * 结束位置
     */
    public void setEndLocation(String endLocation) {
        this.endLocation = endLocation;
    }

    /**
     * 物料编码
     */
    public String getMaterialCode() {
        return materialCode;
    }

    /**
     * 物料编码
     */
    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    /**
     * 重量
     */
    public Double getWeight() {
        return weight;
    }

    /**
     * 重量
     */
    public void setWeight(Double weight) {
        this.weight = weight;
    }

    /**
     * 载具编码
     */
    public String getContainerCode() {
        return containerCode;
    }

    /**
     * 载具编码
     */
    public void setContainerCode(String containerCode) {
        this.containerCode = containerCode;
    }

    /**
     * 状态
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 状态
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 类型
     */
    public Integer getType() {
        return type;
    }

    /**
     * 类型
     */
    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SamplingDao other = (SamplingDao) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDocuments() == null ? other.getDocuments() == null : this.getDocuments().equals(other.getDocuments()))
            && (this.getStartLocation() == null ? other.getStartLocation() == null : this.getStartLocation().equals(other.getStartLocation()))
            && (this.getEndLocation() == null ? other.getEndLocation() == null : this.getEndLocation().equals(other.getEndLocation()))
            && (this.getMaterialCode() == null ? other.getMaterialCode() == null : this.getMaterialCode().equals(other.getMaterialCode()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getContainerCode() == null ? other.getContainerCode() == null : this.getContainerCode().equals(other.getContainerCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDocuments() == null) ? 0 : getDocuments().hashCode());
        result = prime * result + ((getStartLocation() == null) ? 0 : getStartLocation().hashCode());
        result = prime * result + ((getEndLocation() == null) ? 0 : getEndLocation().hashCode());
        result = prime * result + ((getMaterialCode() == null) ? 0 : getMaterialCode().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getContainerCode() == null) ? 0 : getContainerCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", documents=").append(documents);
        sb.append(", startLocation=").append(startLocation);
        sb.append(", endLocation=").append(endLocation);
        sb.append(", materialCode=").append(materialCode);
        sb.append(", weight=").append(weight);
        sb.append(", containerCode=").append(containerCode);
        sb.append(", status=").append(status);
        sb.append(", type=").append(type);
        sb.append("]");
        return sb.toString();
    }
}